﻿function selectPersonal() {

    var persArr = document.getElementById("tapersonal").getElementsByTagName("input");

    if (persArr[1].checked == true || persArr[2].checked == true || persArr[3].checked == true || persArr[4].checked == true) {
        persArr[0].checked = true;
    }
    if (persArr[1].checked == false && persArr[2].checked == false && persArr[3].checked == false && persArr[4].checked == false) {
        persArr[0].checked = false;
    }
}
function selectShedule() {

    var persArr = document.getElementById("tashedule").getElementsByTagName("input");

    if (persArr[1].checked == true || persArr[2].checked == true || persArr[3].checked == true) {
        persArr[0].checked = true;
    }
    if (persArr[1].checked == false && persArr[2].checked == false && persArr[3].checked == false) {
        persArr[0].checked = false;
    }

}
function selectfile() {

    var persArr = document.getElementById("tafile").getElementsByTagName("input");

    if (persArr[1].checked == true || persArr[2].checked == true || persArr[3].checked == true) {
        persArr[0].checked = true;
    }
    if (persArr[1].checked == false && persArr[2].checked == false && persArr[3].checked == false) {
        persArr[0].checked = false;
    }

}
function selectsys() {

    var persArr = document.getElementById("tasys").getElementsByTagName("input");

    if (persArr[1].checked == true || persArr[2].checked == true || persArr[3].checked == true || persArr[4].checked == true) {
        persArr[0].checked = true;
    }
    if (persArr[1].checked == false && persArr[2].checked == false && persArr[3].checked == false && persArr[4].checked == false) {
        persArr[0].checked = false;
    }
}
function selectmsg() {

    var persArr = document.getElementById("tamsg").getElementsByTagName("input");

    if (persArr[1].checked == true || persArr[2].checked == true) {
        persArr[0].checked = true;
    }
    if (persArr[1].checked == false && persArr[2].checked == false) {
        persArr[0].checked = false;
    }

}
function selectkao() {

    var persArr = document.getElementById("takao").getElementsByTagName("input");

    if (persArr[1].checked == true || persArr[2].checked == true || persArr[3].checked == true || persArr[4].checked == true || persArr[5].checked == true) {
        persArr[0].checked = true;
    }
    if (persArr[1].checked == false && persArr[2].checked == false && persArr[3].checked == false && persArr[4].checked == false && persArr[5].checked == false) {
        persArr[0].checked = false;
    }
}
function selectcom() {
    var persArr = document.getElementById("tacom").getElementsByTagName("input");

    if (persArr[1].checked == true || persArr[2].checked == true || persArr[3].checked == true) {
        persArr[0].checked = true;
    }
    if (persArr[1].checked == false && persArr[2].checked == false && persArr[3].checked == false) {
        persArr[0].checked = false;
    }
}
function selectnews() {
    var persArr = document.getElementById("tanews").getElementsByTagName("input");

    if (persArr[1].checked == true || persArr[2].checked == true) {
        persArr[0].checked = true;
    }
    if (persArr[1].checked == false && persArr[2].checked == false) {
        persArr[0].checked = false;
    }
}
function selectroom() {
    var persArr = document.getElementById("taroom").getElementsByTagName("input");

    if (persArr[1].checked == true || persArr[2].checked == true) {
        persArr[0].checked = true;
    }
    if (persArr[1].checked == false && persArr[2].checked == false) {
        persArr[0].checked = false;
    }
}
function selecttools() {
    var persArr = document.getElementById("tatools").getElementsByTagName("input");

    if (persArr[1].checked == true) {
        persArr[0].checked = true;
    }
    if (persArr[1].checked == false) {
        persArr[0].checked = false;
    }
}